package com.core.life.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.core.common.entity.BaseEntity;

/**
 * 消费金额计算实体类
 */
@Entity
@Table(name="t_consume_record")
public class ConsumeRecordEntity extends BaseEntity{

	private static final long serialVersionUID = 1L;

	@Column(name = "payerUserId", nullable = false)
	private Long payerUserId;
	
	/** 消费金额  */
	@Column(name = "consumeMoney", nullable = false)
	private float consumeMoney;
	
	/** 消费人员，按用户id排序，以,连接  */
	@Column(name = "consumeUserIds", nullable = false,length=256)
	private String consumeUserIds;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "consumeTypeId", nullable = false)
	private ConsumeItemEntity consumeItem;
	
	@Enumerated(EnumType.STRING)
	@Column(name = "consumeType", nullable = true,length=32)
	private ConsumeType consumeType;
	
	@Column(name = "year", nullable = true)
	private Integer year;
	
	@Column(name = "month", nullable = true)
	private Integer month;
	
	@Column(name = "day", nullable = true)
	private Integer day;
	
	@Column(name = "deleteFlag", nullable = false)
	private boolean deleteFlag = false;
	
	public Long getPayerUserId() {
		return payerUserId;
	}

	public void setPayerUserId(Long payerUserId) {
		this.payerUserId = payerUserId;
	}

	public float getConsumeMoney() {
		return consumeMoney;
	}

	public void setConsumeMoney(float consumeMoney) {
		this.consumeMoney = consumeMoney;
	}

	public String getConsumeUserIds() {
		return consumeUserIds;
	}

	public void setConsumeUserIds(String consumeUserIds) {
		this.consumeUserIds = consumeUserIds;
	}

	public ConsumeItemEntity getConsumeItem() {
		return consumeItem;
	}

	public void setConsumeItem(ConsumeItemEntity consumeItem) {
		this.consumeItem = consumeItem;
	}

	public ConsumeType getConsumeType() {
		return consumeType;
	}

	public void setConsumeType(ConsumeType consumeType) {
		this.consumeType = consumeType;
	}

	public Integer getYear() {
		return year;
	}

	public void setYear(Integer year) {
		this.year = year;
	}

	public Integer getMonth() {
		return month;
	}

	public void setMonth(Integer month) {
		this.month = month;
	}

	public Integer getDay() {
		return day;
	}

	public void setDay(Integer day) {
		this.day = day;
	}

	public boolean isDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(boolean deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
	
	
}
